[WCF] Simple login
Posted
by Tr?n Qu?c Bình
on Stack Overflow
See other posts from Stack Overflow
or by Tr?n Qu?c Bình
Published on 2010-05-04T06:56:43Z
Indexed on
2010/05/04
6:58 UTC
Read the original article
Hit count: 357
Hi everybody, I have a WCF service like this:
[ServiceContract( SessionMode=SessionMode.Required)]
public interface IService
{
[OperationContract(IsInitiating = true, IsTerminating = false)]
void login(string id);
[OperationContract(IsInitiating = false, IsTerminating = false)]
string getdata();
}
public class Service : IService
{
public void login(string hashedid)
{
if (username != "someusername" || password != "somepassword")
{
// can not get data
}
else
{
// can get data
}
}
public string getdata()
{
return "these are data";
}
}
How can I write the method login and create the client application? Thanks you.
© Stack Overflow or respective owner